import request from "@/utils/request";
import basicHandler from "./basicHandler";
const configUrl = require("@/utils/configUrl");

const domain = configUrl.LINK.domain;
const houseDomain = configUrl.LINK.houseDomain;
const aistFilesvrWebUrl = configUrl.LINK.aistFilesvrWebUrl;
const ImagesUrl = configUrl.LINK.ImagesUrl;



/** 
 * 提交房评
 * houseId, 房源id
 * commentContent
 * imgUrlLlist 
 * reviewDate 带看时间 时间戳 单位秒
 * requestId  打卡请求id
 * userPortId
 * houseType 房源类型
 *  */
export function submitXflfpHouse(data) {
  return request({
    url: houseDomain + "hou/port/submitXflfpHouse",
    method: "post",
    data,
  }).then(basicHandler);
}

/** 
 * 获取该账户下幸福里端口可写房评的房源列表
 * userPortId  端口账户id
 * 
 * */ 
export function getXflfpHouseList(data) {
  return request({
    url: houseDomain + "hou/port/getXflfpHouseList",
    method: "get",
    params: data,
  }).then(basicHandler);
}

/** 
 * 根据requestId获取数据
 * requestId
 * 
 * */ 
 export function getRequestData(data) {
  return request({
    url: houseDomain + "hou/port/getRequestData",
    method: "get",
    params: data,
  }).then(basicHandler);
}

/** 
 * 幸福里房源详情接口
 * houseId
 * portUserId
 * houseType
 * 
 * */ 
 export function xflHouseDetail(data) {
  return request({
    url: houseDomain + "hou/port/xflHouseDetail",
    method: "get",
    params: data,
  }).then(basicHandler);
}
